package com.ytlz.dmcs.model.system.entity;

import java.util.Date;

import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.PersistenceConstructor;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

@Document(collection="sys_menu")
public class SysMenu {
	@Id
	private String id;
	
	private String text;
	
	@Field("parent_id")
	private String parentId;
	
	private String url;
	
	private String type;
	
	@Field("data_type")
	private String dataType;
	
	@Field("create_date")
	private Date createDate;
	
	@Field("modify_date")
	private Date modifyDate;

	
	@PersistenceConstructor
	public SysMenu(String text,String type) {
		this.text = text;
		this.parentId = null;
		this.url = null;
		this.type = type;
		this.createDate = new Date();
		this.modifyDate = new Date();
	}
	
	@PersistenceConstructor
	public SysMenu(String text,String url,String parentId,String type) {
		this.text = text;
		this.url = url;
		this.parentId = parentId;
		this.type = type;
		this.createDate = new Date();
		this.modifyDate = new Date();
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getDataType() {
		return dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getModifyDate() {
		return modifyDate;
	}

	public void setModifyDate(Date modifyDate) {
		this.modifyDate = modifyDate;
	}
	
}
